//
//  ElectronicCardView .swift
//  Kosspot
//
//  Created by 李鑫 on 2025/7/14.
//

import SwiftUI

struct ElectronicCardView: View {
    var body: some View {
        VStack {
            CustomNavigationBar(rightImageName:nil, title: "电子卡包") {}

            VStack(alignment: .center) {
                Image("carCode")
                    .resizable()
                    .frame(width: 136,height: 136)
            }
            .frame(width: 160,height: 160)
            .background(.white)
            .cornerRadius(16)
            .padding(.top,56)
            
            Spacer().frame(height: 24)
            Text("提示:可从相册中选择并上传名片二维码、收款码等，然后它们将显示在手表的电子卡包中。")
                .font(.system(size: 14))
                .foregroundStyle(Color(hex: "#B2B2B2"))
                .padding(.horizontal,24)
            
            Spacer()
            HStack {
                Button {
                    
                } label: {
                    Text("上传")
                        .font(.system(size: 16))
                        .foregroundStyle(Color(hex: "#242424"))
                }
            }
            .frame(maxWidth: .infinity, alignment: .center)
            .frame(height: 44)
            .gradientBackground(colors: [Color(hex: "#00F3AF"),Color(hex: "#00E9DA")], type: .linear(start: .leading, end: .trailing), cornerRadius: 22.0)
            .padding(.horizontal,12)
            .padding(.bottom,20)
        }.navigationBarHidden(true)
            .background(Color(hex: "#0A0A0A"))
            .edgesIgnoringSafeArea(.all)
    }
}

#Preview {
    ElectronicCardView()
}
